package com.dz.lm.common.utils.sign;

import java.util.TreeMap;

/**
 * 签名设置工具类
 * @author zhanghairong
 * @since 2019-05-28
 */
public class OpenSignUtils {
	
	public static String setSign(TreeMap<String, String> paramsMap,String appSecret){
		//return ParamsSign.value(paramsMap,appSecret);
		return null;
	 }
	
	public static void main(String[] args) {
		// 应用密钥
		String appSecret = "a5f8fe5k59eb0c6534787b6d1a739192";

		/* 定义TreeMap容器实例，用于装载请求参数 */
		TreeMap<String, String> paramsMap = new TreeMap<String, String>();
		paramsMap.put("bName", "b1");
		paramsMap.put("aName", "a1");
		paramsMap.put("fName", "f1");
		paramsMap.put("gName", "g1");
		paramsMap.put("dName", "d1");
		paramsMap.put("cName", "c1");

		// 调用SDK方法，获得参数签名值
		String signValue =setSign(paramsMap,appSecret);
		System.out.println("vlue of sign result is : "+signValue);
		
		/* 定义TreeMap容器实例，用于装载请求参数 */
		String appSecret1 = "a5f8fe5k59eb0c6534787b6d1a739193";
		TreeMap<String, String> paramsMap1 = new TreeMap<String, String>();
		paramsMap1.put("bName", "b1");
		paramsMap1.put("aName", "a1");
		paramsMap1.put("fName", "f1");
		paramsMap1.put("gName", "g1");
		paramsMap1.put("dName", "d1");
		paramsMap1.put("cName", "c1");

		// 调用SDK方法，获得参数签名值
		String signValue1 =setSign(paramsMap1,appSecret1);
		System.out.println("vlue of sign1 result is : "+signValue1);

	}
	
}
